package com.smart.community.feign.device;

import com.smart.community.commons.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 设备服务Feign接口
 * 
 * @author Wu.Liang
 */
@FeignClient(
    name = "smart-community-device",
    fallback = DeviceFeignClientFallback.class
)
public interface DeviceFeignClient {
    
    /**
     * 获取设备状态
     * 
     * @param deviceId 设备ID
     * @return 设备状态
     */
    @GetMapping("/device/status/{deviceId}")
    Result<?> getDeviceStatus(@PathVariable("deviceId") Long deviceId);
    
    /**
     * 获取设备列表
     * 
     * @param communityId 社区ID
     * @return 设备列表
     */
    @GetMapping("/device/list/{communityId}")
    Result<?> getDeviceList(@PathVariable("communityId") Long communityId);
    
    /**
     * 获取设备告警
     * 
     * @param deviceId 设备ID
     * @return 设备告警
     */
    @GetMapping("/device/alarm/{deviceId}")
    Result<?> getDeviceAlarm(@PathVariable("deviceId") Long deviceId);
} 
